package com.weed.components;


import com.weed.client.components.skin.BlueSkinResource;
import com.weed.client.components.skin.ResourceInterface;
import com.weed.client.components.util.SkinUtil;

import java.util.logging.Level;
import java.util.logging.Logger;
import javax.swing.ImageIcon;
import javax.swing.JFrame;
import javax.swing.UIManager;
import org.util.grid.DataGrid;


/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/*
 * TestOutlookHeader.java
 *
 * Created on 2010-7-17, 22:38:33
 */

/**
 *
 * @author Jason
 */
public class LogonFrame extends javax.swing.JFrame {
   String[] columns = {"code","name","icon","parentcode","action"};
   Object[][] data = new Object[][]{
       {"001","","images1/LogoMaker.png",null,"com.weed.components.ChoiceAction"},
        {"001","常用组件","images/item.png",null,""},
        {"002","组件演示","images/item.png","001",""},
        {"003","选择组件","images/item.png","002","com.weed.components.ChoiceAction"},
        //{"004","输入组件","images/item.png","002",""},//com.weed.components.InputAction
        {"010","按钮组件","images/item.png","002","com.weed.components.ButtonAction"},
        {"005","表格组件","images/item.png","002","com.weed.components.TableAction"},
        {"006","树型组件","images/item.png","002","com.weed.components.TreeAction"},
        {"010","系统维护","images/item.png",null,""},
        {"011","系统维护","images/item.png","010",""},
        {"007","菜单维护","images/item.png","011",""}
    };
    DataGrid dataGrid = new DataGrid(data,columns);
    public LogonFrame() {
        initComponents();
        this.setIconImage(new ImageIcon(ResourceInterface.class.getResource("images/item.png")).getImage());
        this.setBounds(0,0,1024,768);
        this.mainPane1.setSrcColumn("code,name,icon,parentcode,action");
        this.mainPane1.setDataGrid(dataGrid);
        this.setExtendedState(JFrame.MAXIMIZED_BOTH);
        this.setVisible(true);
         if(mainPane1.getOnebutton()!=null)
            mainPane1.getOnebutton().mouseClicked(null);
    }

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jLabel1 = new javax.swing.JLabel();
        mainPane1 = new com.weed.client.login.MainPane();

        jLabel1.setText("jLabel1");

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
        setTitle("组件演示");
        setExtendedState(1);
        getContentPane().add(mainPane1, java.awt.BorderLayout.CENTER);

        pack();
    }// </editor-fold>//GEN-END:initComponents

    /**
    * @param args the command line arguments
    */
    public static void main(String args[]) {
        java.awt.EventQueue.invokeLater(new Runnable() {
            public void run() {
             try {
              System.setProperty("java.awt.im.style","on-the-spot");
              
              //WeedLookAndFeel wlaf = new WeedLookAndFeel();
              //UIManager.setLookAndFeel(wlaf);
              // com.seaglasslookandfeel.SeaGlassLookAndFeel sglaf = new com.seaglasslookandfeel.SeaGlassLookAndFeel();
             
               UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
               //UIManager.setLookAndFeel("ch.randelshofer.quaqua.QuaquaLookAndFeel");
                //UIManager.setLookAndFeel(sglaf);
               JFrame.setDefaultLookAndFeelDecorated(true);
                //UIManager.setLookAndFeel("com.seaglasslookandfeel.SeaGlassLookAndFeel");
                java.awt.Font font =new java.awt.Font("微软雅黑", 0, 13);
               UIManager.put(SkinUtil.SKIN_CLASS,new BlueSkinResource());
               UIManager.getLookAndFeelDefaults().put("defaultFont",font);
               UIManager.put("ToolTip.font",font);
                UIManager.put("Table.font",font);
                UIManager.put("TableHeader.font",font);
                UIManager.put("TextField.font",font);
                UIManager.put("ComboBox.font",font);
                UIManager.put("TextField.font",font);
                UIManager.put("PasswordField.font",font);
                UIManager.put("TextArea.font",font);
                UIManager.put("TextPane.font",font);
                UIManager.put("EditorPane.font",font);
                UIManager.put("FormattedTextField.font",font);
                UIManager.put("Button.font",font);
                UIManager.put("CheckBox.font",font);
                UIManager.put("RadioButton.font",font);
                UIManager.put("ToggleButton.font",font);
                UIManager.put("ProgressBar.font",font);
                UIManager.put("DesktopIcon.font",font);
                UIManager.put("TitledBorder.font",font);
                UIManager.put("Label.font",font);
                UIManager.put("List.font",font);
                UIManager.put("TabbedPane.font",font);
                UIManager.put("MenuBar.font",font);
                UIManager.put("Menu.font",font);
                UIManager.put("MenuItem.font",font);
                UIManager.put("PopupMenu.font",font);
                UIManager.put("CheckBoxMenuItem.font",font);
                UIManager.put("RadioButtonMenuItem.font",font);
                UIManager.put("Spinner.font",font);
                UIManager.put("Tree.font",font);
                UIManager.put("ToolBar.font",font);
                UIManager.put("OptionPane.messageFont",font);
                UIManager.put("OptionPane.buttonFont",font);
                
               new LogonFrame();
               
            } catch (Exception ex) {
                Logger.getLogger(LogonFrame.class.getName()).log(Level.SEVERE, null, ex);
            }
                
            }
        });

    }

    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JLabel jLabel1;
    private com.weed.client.login.MainPane mainPane1;
    // End of variables declaration//GEN-END:variables

}
